﻿package cgs.server.logging
{
    import com.adobe.crypto.*;
    import flash.utils.*;

    public class GameServerData extends Object
    {
        private var _legacyMode:Boolean;
        private var _serverURL:String;
        private var _abTestingURL:String;
        private var _useDevServer:Boolean;
        private var _skey:String;
        private var _skeyHashVersion:int = 1;
        private var _encoding:int = 0;
        private var _userName:String = "";
        private var _uuid:String = "";
        private var _gid:int;
        private var _g_name:String;
        private var _vid:int;
        private var _cid:int;
        private var _eid:int = -1;
        private var _tid:int = -1;
        private var _lid:int = -1;
        private var _sessionID:String;
        private var _swfDomain:String;
        public static const NO_SKEY_HASH:int = 0;
        public static const UUID_SKEY_HASH:int = 1;
        public static const DATA_SKEY_HASH:int = 2;
        public static const NO_DATA_ENCODING:int = 0;
        public static const BASE_64_ENCODING:int = 1;
        private static var _instance:GameServerData;

        public function GameServerData()
        {
            return;
        }// end function

        public function get legacyMode() : Boolean
        {
            return this._legacyMode;
        }// end function

        public function set legacyMode(param1:Boolean) : void
        {
            this._legacyMode = param1;
            return;
        }// end function

        public function set serverURL(param1:String) : void
        {
            this._serverURL = param1;
            return;
        }// end function

        public function get serverURL() : String
        {
            return this._serverURL;
        }// end function

        public function set abTestingURL(param1:String) : void
        {
            this._abTestingURL = param1;
            return;
        }// end function

        public function get abTestingURL() : String
        {
            return this._abTestingURL;
        }// end function

        public function set useDevelopmentServer(param1:Boolean) : void
        {
            this._useDevServer = param1;
            return;
        }// end function

        public function get useDevelopmentServer() : Boolean
        {
            return this._useDevServer;
        }// end function

        public function set skeyHashVersion(param1:int) : void
        {
            this._skeyHashVersion = param1;
            return;
        }// end function

        public function get skeyHashVersion() : int
        {
            return this._skeyHashVersion;
        }// end function

        public function get dataEncoding() : int
        {
            return this._encoding;
        }// end function

        public function set dataEncoding(param1:int) : void
        {
            this._encoding = param1;
            return;
        }// end function

        public function set skey(param1:String) : void
        {
            this._skey = param1;
            return;
        }// end function

        public function get skey() : String
        {
            return this._skey;
        }// end function

        public function createSkeyHash(param1:String) : String
        {
            var _loc_2:* = new MD5Stream();
            var _loc_3:* = new ByteArray();
            var _loc_4:* = param1 + this._skey;
            _loc_3.writeUTFBytes(_loc_4);
            _loc_3.position = 0;
            _loc_2.update(_loc_3);
            return _loc_2.complete();
        }// end function

        public function set userName(param1:String) : void
        {
            this._userName = param1;
            return;
        }// end function

        public function get userName() : String
        {
            return this._userName;
        }// end function

        public function set uuid(param1:String) : void
        {
            this._uuid = param1;
            return;
        }// end function

        public function get uuid() : String
        {
            return this._uuid;
        }// end function

        public function set g_name(param1:String) : void
        {
            this._g_name = param1;
            return;
        }// end function

        public function get g_name() : String
        {
            return this._g_name;
        }// end function

        public function set gid(param1:int) : void
        {
            this._gid = param1;
            return;
        }// end function

        public function get gid() : int
        {
            return this._gid;
        }// end function

        public function get svid() : int
        {
            return this._skeyHashVersion;
        }// end function

        public function set vid(param1:int) : void
        {
            this._vid = param1;
            return;
        }// end function

        public function get vid() : int
        {
            return this._vid;
        }// end function

        public function set cid(param1:int) : void
        {
            this._cid = param1;
            return;
        }// end function

        public function get cid() : int
        {
            return this._cid;
        }// end function

        public function get isEventIDValid() : Boolean
        {
            return this._eid >= 0;
        }// end function

        public function set eid(param1:int) : void
        {
            this._eid = param1;
            return;
        }// end function

        public function get eid() : int
        {
            return this._eid;
        }// end function

        public function get isTypeIDValid() : Boolean
        {
            return this._tid >= 0;
        }// end function

        public function set tid(param1:int) : void
        {
            this._tid = param1;
            return;
        }// end function

        public function get tid() : int
        {
            return this._tid;
        }// end function

        public function get isLevelIDValid() : Boolean
        {
            return this._lid >= 0;
        }// end function

        public function set lid(param1:int) : void
        {
            this._lid = param1;
            return;
        }// end function

        public function get lid() : int
        {
            return this._lid;
        }// end function

        public function get isSessionIDValid() : Boolean
        {
            return this._sessionID != null;
        }// end function

        public function set sid(param1:String) : void
        {
            this._sessionID = param1;
            return;
        }// end function

        public function get sid() : String
        {
            return this._sessionID;
        }// end function

        public function get isSWFDomainValid() : Boolean
        {
            return this._swfDomain != null;
        }// end function

        public function get swfDomain() : String
        {
            return this._swfDomain;
        }// end function

        public function set swfDomain(param1:String) : void
        {
            this._swfDomain = param1;
            return;
        }// end function

        public static function get instance() : GameServerData
        {
            if (_instance == null)
            {
                _instance = new GameServerData;
            }
            return _instance;
        }// end function

        public static function set legacyMode(param1:Boolean) : void
        {
            instance.legacyMode = param1;
            return;
        }// end function

        public static function get legacyMode() : Boolean
        {
            return instance.legacyMode;
        }// end function

        public static function set serverURL(param1:String) : void
        {
            instance.serverURL = param1;
            return;
        }// end function

        public static function get serverURL() : String
        {
            return instance.serverURL;
        }// end function

        public static function set abTestingURL(param1:String) : void
        {
            instance.abTestingURL = param1;
            return;
        }// end function

        public static function get abTestingURL() : String
        {
            return instance.abTestingURL;
        }// end function

        public static function set useDevelopmentServer(param1:Boolean) : void
        {
            instance.useDevelopmentServer = param1;
            return;
        }// end function

        public static function get useDevelopmentServer() : Boolean
        {
            return instance.useDevelopmentServer;
        }// end function

        public static function set skeyHashVersion(param1:int) : void
        {
            instance.skeyHashVersion = param1;
            return;
        }// end function

        public static function get skeyHashVersion() : int
        {
            return instance.skeyHashVersion;
        }// end function

        public static function get dataEncoding() : int
        {
            return instance.dataEncoding;
        }// end function

        public static function set dataEncoding(param1:int) : void
        {
            instance.dataEncoding = param1;
            return;
        }// end function

        public static function set skey(param1:String) : void
        {
            instance.skey = param1;
            return;
        }// end function

        public static function get skey() : String
        {
            return instance.skey;
        }// end function

        public static function createSkeyHash(param1:String) : String
        {
            return instance.createSkeyHash(param1);
        }// end function

        public static function set userName(param1:String) : void
        {
            instance.userName = param1;
            return;
        }// end function

        public static function get userName() : String
        {
            return instance.userName;
        }// end function

        public static function set uuid(param1:String) : void
        {
            instance.uuid = param1;
            return;
        }// end function

        public static function get uuid() : String
        {
            return instance.uuid;
        }// end function

        public static function set g_name(param1:String) : void
        {
            instance.g_name = param1;
            return;
        }// end function

        public static function get g_name() : String
        {
            return instance.g_name;
        }// end function

        public static function set gid(param1:int) : void
        {
            instance.gid = param1;
            return;
        }// end function

        public static function get gid() : int
        {
            return instance.gid;
        }// end function

        public static function get svid() : int
        {
            return instance._skeyHashVersion;
        }// end function

        public static function set vid(param1:int) : void
        {
            instance.vid = param1;
            return;
        }// end function

        public static function get vid() : int
        {
            return instance.vid;
        }// end function

        public static function set cid(param1:int) : void
        {
            instance.cid = param1;
            return;
        }// end function

        public static function get cid() : int
        {
            return instance.cid;
        }// end function

        public static function get isEventIDValid() : Boolean
        {
            return instance.isEventIDValid;
        }// end function

        public static function set eid(param1:int) : void
        {
            instance.eid = param1;
            return;
        }// end function

        public static function get eid() : int
        {
            return instance.eid;
        }// end function

        public static function get isTypeIDValid() : Boolean
        {
            return instance.isTypeIDValid;
        }// end function

        public static function set tid(param1:int) : void
        {
            instance.tid = param1;
            return;
        }// end function

        public static function get tid() : int
        {
            return instance.tid;
        }// end function

        public static function get isLevelIDValid() : Boolean
        {
            return instance.isLevelIDValid;
        }// end function

        public static function set lid(param1:int) : void
        {
            instance.lid = param1;
            return;
        }// end function

        public static function get lid() : int
        {
            return instance.lid;
        }// end function

        public static function get isSessionIDValid() : Boolean
        {
            return instance.isSessionIDValid;
        }// end function

        public static function set sid(param1:String) : void
        {
            instance.sid = param1;
            return;
        }// end function

        public static function get sid() : String
        {
            return instance.sid;
        }// end function

        public static function get isSWFDomainValid() : Boolean
        {
            return instance.isSWFDomainValid;
        }// end function

        public static function get swfDomain() : String
        {
            return instance.swfDomain;
        }// end function

        public static function set swfDomain(param1:String) : void
        {
            instance.swfDomain = param1;
            return;
        }// end function

    }
}
